home *** CD-ROM | disk | FTP | other *** search
- Submitted-by: jazz@hal.com (Jason Zions)
-
- In article <20iskbINN34t@rodan.UU.NET> lwv26@cas.org (Larry W. Virden) writes:
- >>Strictly conforming applications don't try to read() directories
- >>with the assumption that they're doing something equivalent to readdir(),
- >>since the standard doesn't say they can; however, a strictly-conforming
- >>application is allowed to read() a directory for any purpose.
- >
- >So an application needs to do a stat first and determine whether the file
- >type is one which is permitted to be read() before doing the reading?
-
- No. According to 1003.1, *all* file types may be read(). It's only when you
- add NFS and try to access files over NFS that the standard becomes
- irrelevant, and can detect whatever it wants to however it wants to (wait
- for read() to fail with EISDIR or stat() before open()).
-
- > Moving
- >back to the question of the grep -s - is it then permitted for grep to
- >be silent about the fact that one of the arbitrary character string arguments
- >is a directory that is being skipped?
-
- I think so, but this is just my opinion.
-
- >I guess someone will have to write up one of the interpretation requests.
-
- That's the only way to get a definitive answer. In the interp request, be
- sure to point out that the system in question is not 1003.1-conforming, and
- that the system prohibits read() of a directory.
-
- Jason Zions
- Not an official opinion of any entity other than the author
-
-
- Volume-Number: Volume 31, Number 89
-
-